package com.gitee.cui.client.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.stereotype.Component;

/**
 * 系统配置数读取类
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2021-10-27 22:37
 **/
@Data
@Component
@Configuration
@PropertySource("classpath:application.properties")
public class SystemConfig {

	@Value("127.0.0.1")
	private String host;

	@Value("8081")
	private int port;

	@Bean
	public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
		return new PropertySourcesPlaceholderConfigurer();
	}
}
